//
//  JYOrderDetaCell.m
//  JYFarm
//
//  Created by 花花 on 2017/10/17.
//  Copyright © 2017年 花花. All rights reserved.
//

#import "JYOrderDetaCell.h"

@implementation JYOrderDetaCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self setupSubView];
    }
    return self;

}

- (void)setupSubView{

    [self.contentView addSubview:self.leftLabel];
    [self.contentView addSubview:self.rightLabel];
    
}
- (void)layoutSubviews{

    [super layoutSubviews];
    CGFloat margin = 10;
    JYWeakSelf;
    [self.leftLabel  mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(margin);
        make.centerY.mas_equalTo(weakSelf.contentView.mas_centerY);
        
    }];
    [self.rightLabel  mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-margin);
        make.centerY.mas_equalTo(weakSelf.contentView.mas_centerY);
        
    }];

}
- (UILabel *)leftLabel{

    if (!_leftLabel) {
        _leftLabel = [UILabel labelText:@"" fontSize:13 textColor:k3Color textAlignment:NSTextAlignmentLeft];
    }
    
    return _leftLabel;
}
- (UILabel *)rightLabel{
    
    if (!_rightLabel) {
        _rightLabel = [UILabel labelText:@"" fontSize:13 textColor:k9Color textAlignment:NSTextAlignmentRight];
    }
    
    return _rightLabel;


}
@end
